refactor(wizard): use computed signal for internal states#1855
refactor(wizard): use computed signal for internal states#1855chintankavathia merged 1 commit intomainfrom
Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors the SiWizardComponent to utilize Angular signals for derived state, replacing several methods with computed signals that pre-calculate step properties such as states, icons, and ARIA attributes. While this aligns with signal-based state management, the canActivateSteps signal introduces an O(N²) complexity that should be optimized to O(N). Additionally, consolidating the multiple computed signals that iterate over the steps array into a single metadata signal would improve maintainability and reduce redundant allocations.
4820cba to
4d395a0
Compare
a3d67f9 to
f386731
Compare
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request refactors the SiWizardComponent to use a computed signal for step metadata, optimizing performance by pre-calculating state, accessibility attributes, and icons for each step. This change replaces multiple individual method calls in the template with a unified metadata object. Feedback was provided to add a bounds check when accessing the metadata array in the next method to prevent potential runtime errors from out-of-bounds indices.
fb43ccd to
4f3a17e
Compare
4f3a17e to
acee226
Compare
Use computed signal to calculate and cache the internal wizard step states instead of function call which would be called in each check cycle.
Documentation.
Examples.
Dashboards Demo.
Playwright report.
Coverage Reports: